<template>
  <div class="feed-new">
    <p class="new-title">反馈留言</p>
    <textarea v-model="feedCont" id="" class="new-cont" placeholder="请说明情况，并留下联系方式"></textarea>
    <p class="new-limit">{{feedCont.length}}/512字</p>
    <div class="new-btn" @click="addFeedBack()">提交</div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      feedCont:''
    }
  },
  created(){

  },
  methods:{
    addFeedBack(){
      if(this.util.checkTextForbid(this.feedCont)){
        return;
      }
      this.$http.postForm('/user/addFeedBack', {content:this.feedCont}, res=>{
        this.util.goback();
      });
    }
  }
}
</script>

<style lang='scss' scoped>
.feed-new {
  padding: 30px;
  .new-title {
    margin: 0 0 20px 0;
    font-size: 20px;
  }
  .new-cont {
    padding: 10px;
    width: 100%;
    height: 200px;
    outline: none;
    resize: none;
    border: 1px solid #eaeaea;
  }
  .new-limit{
    color: #999;
  }
  .new-btn {
    cursor: pointer;
    margin-top: 20px;
    width: 100px;
    line-height: 40px;
    background: $base-color;
    color: #ffffff;
    border-radius: 5px;
    text-align: center;
  }
}
</style>